﻿CREATE TABLE [dbo].[ProductInfo] (
    [ProductID]         BIGINT         IDENTITY (10001, 1) NOT NULL,
    [ProductBaseID]     BIGINT         NOT NULL,
    [SpecPropGroupName] NVARCHAR (200) NULL,
    [GroupIDs]          VARCHAR (MAX)  NULL,
    [IsDeleted]         BIT            NOT NULL,
    [IsSoldOut]         BIT            NOT NULL,
    [Inventory]         INT            NOT NULL,
    [DefaultPrice]      MONEY          NOT NULL,
    [InventoryWran]     INT            NULL,
    [CreateTime]        DATETIME       NOT NULL,
    [TotalSell]         INT            NOT NULL,
    [MonthSell]         INT            NOT NULL,
    CONSTRAINT [PK_PRODUCTINFO] PRIMARY KEY CLUSTERED ([ProductID] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'月销量', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'MonthSell';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'总销量', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'TotalSell';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'添加时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'CreateTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'库存预警', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'InventoryWran';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'默认价格', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'DefaultPrice';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'库存', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'Inventory';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'已下架', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'IsSoldOut';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'已删除', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'IsDeleted';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'包含规格属性标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'GroupIDs';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'规格属性组合名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'SpecPropGroupName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品基本信息标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'ProductBaseID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品标识', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo', @level2type = N'COLUMN', @level2name = N'ProductID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'商品信息', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'ProductInfo';

